// Copyright (c) 2009 Luca Marrocco.
// Modified or written by Luca Marrocco for inclusion with codej.
// Licensed under the Apache License, Version 2.0 (the "License")
package codej.ast;

import java.util.*;

/** @author Luca Marrocco */
public class ArrayInitializer extends AbstractNode implements VariableInitializer {
	
	private int dimension = 0;
	private List<VariableInitializer> variableInitializers = new LinkedList<VariableInitializer>();

	public void accept(Visitor visitor) {
		visitor.visit(this);
	}

	public ArrayInitializer addVariableInitializer(VariableInitializer variableInitializer) {
		variableInitializers.add(variableInitializer);
		return this;
	}

	public int getDimension() {
		return dimension;
	}

	public List<VariableInitializer> getVariableInitializers() {
		return variableInitializers;
	}

	public ArrayInitializer setDimension(int dimension) {
		this.dimension = dimension;
		return this;
	}
}
